#include "Character.h"
#include <qpainter.h>

// Default constructor
Character::Character(QWidget * parent) 
	: mName("")
	, mDescription("")
	, mStrengthValue(0)
	, mCraftValue(0)
	, QWidget(parent)
{
	setAttribute(Qt::WA_TranslucentBackground, true);
}

// Character constructor
Character::Character(string iCharacterName
	, string iCharacterDescription
	, unsigned int iCharacterStrengthValue
	, unsigned int iCraftValue) 
	: mName(iCharacterName)
	, mDescription(iCharacterDescription)
	, mStrengthValue(iCharacterStrengthValue)
	, mCraftValue(iCraftValue)
	, QWidget(0)
{
	setAttribute(Qt::WA_TranslucentBackground, true);
}

// Destructor
Character::~Character()
{
}

void Character::paintEvent(QPaintEvent * event)
{
	QPainter qpainter(this);
	qpainter.drawImage(0, 0, *getPicture());
	qpainter.end();

}

const QImage * Character::getPicture(void) const
{
	return &picture; 
};